function mapAnimate() {
var val = document.images.mainmap2.src;
var check = val.charAt(val.length - 6);
if (check != "_") {
var length = val.length - 4;
var map = val.substr(0,length);
document.images.mainmap2.src = map + "_a.gif";
}
else {
document.images.mainmap2.src = val;
}
}

function mapStop() {
var val = document.images.mainmap2.src;
var check = val.charAt(val.length - 6);
if (check != "_") {
document.images.mainmap2.src = val;
}
else {
var map = val.substr(0,val.length - 6);
document.images.mainmap2.src = map + ".gif";
}
}

function swapMap(val) {
if (val.match("http://content.myweather.net/webhdcontent/global/pix/maps/")){
window.document.location.href="template1topfull.html?host=wuxp&section=12&page=47";
}
else if (1 == 1) {
if (val.match("http://content.myweather.net/webhdcontent/global/pix/pwmaps")) {
if (34 == 46 || 34 == 20) {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=371&carousel=3";
}
else {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=371&carousel=";
}
}
else {
document.images.mainmap.src = val+"_full.jpg";
var mapsrc = document.images.mainmap.src;
var mywxad1 = document.getElementById('mywxisland1').innerHTML;
var mywxad2 = document.getElementById('mywxisland2').innerHTML;
var featuresad = document.getElementById('features-ad').src;
document.getElementById('mywxisland1').innerHTML = mywxad1;
document.getElementById('mywxisland2').innerHTML = mywxad2;
frames['features-ad'].location.href = featuresad;
if (mapsrc == "http://content.myweather.net/images/default_flightdelay_radar_full.jpg") {
document.images['mainmap'].useMap = '#delays';
document.getElementById('delaytext').style.display = 'block';
}
else {
document.images['mainmap'].useMap = '#none';
document.getElementById('delaytext').style.display = 'none';
} 
}
}
else {
if (val.match("http://content.myweather.net/webhdcontent/global/pix/pwmaps")) {
if (34 == 46 || 34 == 20) {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=371&carousel=3";
}
else {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=371&carousel=";
}
}
else {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=1&mainmap="+val;
}
}
}

function swapMapewx(val) {
if (val.match("http://content.myweather.net/webhdcontent/global/pix/pwmaps")) {
if (34 == 46 || 34 == 20) {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=371&carousel=3";
}
else {
window.document.location.href = "http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=371&carousel=";
}
}
else if (val == "http://wp.myweather.net/wp/maps/us_heatindexl") {
document.images.mainmap2.src="http://wp.myweather.net/wp/maps/us_heatindex_a.gif";
}
else {
document.images.mainmap2.src = val+"_a.gif";
var mapsrc = document.images.mainmap2.src;
var mywxad1 = document.getElementById('mywxisland1').innerHTML;
var mywxad2 = document.getElementById('mywxisland2').innerHTML;
var featuresad = document.getElementById('features-ad').src;
document.getElementById('mywxisland1').innerHTML = mywxad1;
document.getElementById('mywxisland2').innerHTML = mywxad2;
frames['features-ad'].location.href = featuresad;
}
}

function delays(val) {
document.location='http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=36&pgurl=http://www.fly.faa.gov/flyfaa/flyfaaindex.jsp?ARPT='+val;
}

function custom(val) {
document.location ="http://myweathercontent.myweather.net/webhd/pkg/v2/template1.html?host=wuxp&section=9&page=34&story=35&pgurl="+val;
}
